[mirrors]
http://downloads.sourceforge.net/project/bridge/bridge/bridge-utils-1.5.tar.gz

[vars]
filesize=33243
sha512=4e525fbd3defb509664ef3b728d9e5edfb92beaebdb5d7733d8203fb38cb3f4bb54d02dc1e28813889a2ee19c78b9b47da6d99c8032481a7fd7f104658dea7c3
desc="provides brctl utility, required to create and manage bridge devices"

[deps]

[build]

patch -p1 < "$K"/bridge-utils.patch

# since bridgeutils package comes without configure script, rather than
# relying on autoreconf -r etc, we just throw *.c at gcc.
# if in the future libbrigde is needed for something, we'll consider
# creating a plain makefile instead.

cat << EOF > config.h
#define PACKAGE_NAME "brigde-utils"
#define PACKAGE_VERSION 15
EOF

gcc -static -Os -s -fwhole-program -flto -I. -I libbridge/ -include sys/types.h `find . -name '*.c'` -o brctl.out

dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/bin
cp brctl.out "$dest"/bin/brctl
mkdir -p "$dest"/share/man/man8
cp doc/brctl.8 "$dest"/share/man/man8/
